<?php

namespace api\wxapp\model;

use think\Model;

class Refund extends Model
{
    protected $table = 'sssc_app_refund';
    public function leftuser($query)
    {
        // 按照创建时间排序
        return $query->join('app_user t3','t3.id = t2.uid');
    }
    public function leftorder($query)
    {
        // 按照创建时间排序
        return $query->join('app_goods_order t2','t2.id = t1.order_id');
    }
    public function returnfield($query)
    {
        return $query->field('t1.id,t1.status,t1.img,t1.reason,t1.apply_price,t1.type,t1.is_coupon,t1.goods_id,t2.ordernum,t2.pay_price,t2.shop_id,t3.nickname');
    }
}
